<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 1.先定义 初始值 apple1是青苹果 apple2是红苹果
        // 2.定义一个空变量
        // 3.将apple1 给临时变量
        // 4.将apple2给apple1
        // 5.将临时变量给apple2
        var apple1 = '青苹果';
        var apple2 = '红苹果';
        var temp;
        temp = apple1;
        apple1 = apple2;
        apple2 =temp;
        console.log(apple1);
        console.log(apple2);
        console.log(temp);
    </script>
</head>
<body>
    
</body>
</html>